﻿<%@ Page Title="【个人中心】- 获赠记录" Language="C#" MasterPageFile="~/APP_Master/MasterPage_Personal.master"
    AutoEventWireup="true" CodeFile="per_given_record.aspx.cs" Inherits="per_given_record" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="../js/jquery-1.8.0.min.js" type="text/javascript"></script>
    <script src="../App_Themes/js/jquery.jBox-2.3.min.js" type="text/javascript"></script>
    <script src="../App_Themes/js/jquery.jBox-zh-CN.js" type="text/javascript"></script>
    <link href="../App_Themes/css/Red/jbox.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function lotteryInfo(id) {
            $.jBox("iframe:/lotteryInfo.aspx?id=" + id, {
                title: "查看号码详细",
                width: 600,
                height: 400,
                top: 100,
                buttons: {}
            })
        }
        //清除cookie  
        function clearCookie(name) {
            setCookie(name, "", -1);
        }
        //设置cookie
        function setCookie(cname, cvalue, exdays) {
            var d = new Date();
            d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
            var expires = "expires=" + d.toUTCString();
            document.cookie = cname + "=" + cvalue + "; " + expires;
        }
        $(document).ready(function () {
            //-----------------Start-----------------------
            //5为3D，1为双色球，2为大乐透
            var strRequest = getQueryString("StrClear");
            if (strRequest == "5") {
                clearCookie("cookiestr_3d_betting");
                clearCookie("cookiestr_3d_betting_arrcount");
                clearCookie("ArrayList_3d");
                clearCookie("ArrayList_3dDelete");
            }
            else if (strRequest == "1") {
                clearCookie("cookiestr_double_betting");
                clearCookie("cookiestr_double_betting_arrcount");
                clearCookie("ArrayList");
            }
            else {
                clearCookie("cookiestr_dlt_betting");
                clearCookie("cookiestr_dlt_betting_arrcount");
                clearCookie("ArrayList_dlt");
            }
            //-----------------End-----------------------
        });
        //获取地址栏上的参数
        function getQueryString(key) {
            var searchString = document.location.search.toString();
            var returnValue = '';
            if (searchString.substr(0, 1) == '?' && searchString.length > 1) {
                var queryString = searchString.substring(1, searchString.length)
                var queryList = queryString.split('&');
                for (var i = 0; i < queryList.length; i++) {
                    var oneQuery = queryList[i].split('=');
                    if (oneQuery[0] == key && oneQuery.length == 2) {
                        returnValue = oneQuery[1];
                    }
                }
            }
            return returnValue;
        }


    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <!--Right-->
    <div class="per_right_con">
        <!--exNav-->
        <ul class="per_ex_nav">
            <li><a href="per_given_record.aspx?p=11" class="cur">获赠记录</a></li>
        </ul>
        <!--exNav-->
        <div class="per_given_record_t">
            <dl class="select03">
                <asp:DropDownList ID="timesl" runat="server" AutoPostBack="true"
                    OnSelectedIndexChanged="timesl_SelectedIndexChanged1">
                    <asp:ListItem Value="5">全部</asp:ListItem>
                    <asp:ListItem Value="0">今天</asp:ListItem>
                    <asp:ListItem Value="1">近一周</asp:ListItem>
                    <asp:ListItem Value="2">近一个月</asp:ListItem>
                    <asp:ListItem Value="3">近三个月</asp:ListItem>
                    <asp:ListItem Value="4">近六个月</asp:ListItem>
                </asp:DropDownList>
            </dl>
            <dl class="select03">
                <asp:DropDownList ID="typeslddl" runat="server" AutoPostBack="true"
                    OnSelectedIndexChanged="timesl_SelectedIndexChanged">
                    <asp:ListItem Value="0">全部彩种</asp:ListItem>
                    <asp:ListItem Value="1">双色球</asp:ListItem>
                    <asp:ListItem Value="2">大乐透</asp:ListItem>
                    <asp:ListItem Value="3">排列三</asp:ListItem>
                    <asp:ListItem Value="4">排列五</asp:ListItem>
                    <asp:ListItem Value="5">福彩3D</asp:ListItem>
                    <asp:ListItem Value="6">七星彩</asp:ListItem>
                    <asp:ListItem Value="7">七乐彩</asp:ListItem>
                </asp:DropDownList>

            </dl>
        </div>
        <ul class="per_ex_title_ul">
            <%--  <ul class="per_giving_title_ul">--%>
            <li>时间</li>
            <li>彩种|期次</li>
            <li>方案描述</li>
            <li>金额</li>
            <li>出票状态</li>
            <li>我的奖金</li>
            <li>详情</li>
        </ul>

        <%if (buyInfo != null)
            { %>

        <%
            for (int i = 0; i < buyInfo.Count; i++)
            {%>
        <ul class="per_giving_con_ul">
            <li><%=buyInfo[i].AddTime.ToString("yyyy-MM-dd") %></li>
            <li><%=buyInfo[i].LotteryType == 1 ? "双色球" : (buyInfo[i].LotteryType == 2 ? "大乐透" : (buyInfo[i].LotteryType == 3 ? "排列三" : (buyInfo[i].LotteryType == 4 ? "排列五" : (buyInfo[i].LotteryType == 5 ? "福彩3D" : (buyInfo[i].LotteryType == 6 ? "七星彩" : (buyInfo[i].LotteryType == 7 ? "七乐彩" : ""))))))%><%=buyInfo[i].LotteryQs %>期</li>
            <li><span>赠送</span><%=buyInfo[i].LotteryCount %>注(<%=buyInfo[i].LotteryMultiple %>倍)</li>
            <li><em><%=buyInfo[i].LotteryMoney%></em>元</li>
            <li>出票成功</li>
            <li><%if (buyInfo[i].IsWin == false)
                    {%>
        等待开奖<%}
                else
                { %>
        已派奖<%=buyInfo[i].WinMoney%>元
        <%} %></li>
            <li><a href="javascript:void(0);" onclick="return lotteryInfo(<%=buyInfo[i].id %>)">查看号码</a></li>
        </ul>
        <%}
            }
            else
            { %>
        <ul class="per_integral_con_ul">

            <div style="text-align: center">暂无记录</div>
        </ul>
        <%}%>
        <!--Pages-->
        <div class="sabrosus">
            <webdiyer:AspNetPager SubmitButtonClass="buttons" ID="AspNetPager1"
                runat="server" AlwaysShow="True" FirstPageText="首页"
                NextPageText="下一页" PrevPageText="前一页" LastPageText="尾页" PageSize="10"
                OnPageChanged="AspNetPager1_PageChanged">
            </webdiyer:AspNetPager>
        </div>
        <div class="per_r_infor per_g_margin">
            <h3>获赠彩票-注意事项：</h3>
            <p>获赠彩票若中奖后，奖金可购买彩票或提款至银行卡；</p>
        </div>
    </div>
    <!--Right-->
    <div class="per_bg_bottom"></div>
    </div>
    <!--Content-->
</asp:Content>
